package com.gitee.somenvm.ninerpgitem.core.resolver

import taboolib.common.LifeCycle
import taboolib.common.inject.ClassVisitor
import taboolib.common.platform.Awake
import taboolib.library.reflex.ClassField
import taboolib.library.reflex.ClassMethod
import taboolib.library.reflex.ReflexClass
import java.util.function.Supplier
@Awake
class ParserLoader : ClassVisitor(0) {
    override fun getLifeCycle(): LifeCycle {
        return LifeCycle.LOAD
    }

    override fun visitEnd(clazz: ReflexClass) {
        if (!clazz.toClass().interfaces.any { it == PlaceholderResolver::class.java }) {
            return
        }
        val resolver =findInstance(clazz) as? PlaceholderResolver
        resolver?.register()
    }

}